# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdewebkit
pkgver=5.73.0
pkgrel=0
pkgdesc="Integration of the HTML rendering engine WebKit"
arch="all !armhf" # armhf blocked by extra-cmake-modules
arch="$arch !mips !mips64" # mips blocked by qt5-qtwebkit
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtbase-dev qt5-qtwebkit-dev kconfig-dev kcoreaddons-dev kio-dev kjobwidgets-dev kparts-dev kservice-dev kwallet-dev qt5-qttools-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kdewebkit-$pkgver.tar.xz"
subpackages="$pkgname-dev"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}


package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="edf7d35253402a931696b360ecb9efbc2a897642e3edbfa31fad1c85c056eccbcfe68c9a37c3e3925b83a70cdbbc25d3ea27f666cae7547aa3c53ea27fead269  kdewebkit-5.73.0.tar.xz"
